<?php

namespace app\admin\controller;

use EasyWeChat\Factory;
use think\App;
use think\Controller;

class Base extends Controller
{
    public  $wxbase;
    public  $wxpay;
    public function __construct(App $app = null)
    {
        parent::__construct($app);
        $this->wxbase = Factory::officialAccount(config('wxconfig'));
        $this->wxpay=Factory::payment(config('wxpayconfig'));

        if (!session('admin')){
            return $this->redirect('admin/login/login');
        }
    }
}
